<?php
namespace Services;
/**
 * File holds class for feedback data manipulation
 *
 * PHP version 5.3.5
 *
 * @category   CM
 * @package    Services
 * @subpackage -
 * @author     markus karileet <markuskarileet@hotmail.com>
 * @license    http://www.gnu.org/copyleft/gpl.html GNU GPL
 * @link       -
 */
class Feedback {
	/**
	 * Method stores feedback to database
	 * @param \Entities\Feedback $feedback Feedback to store
	 * @return boolean true on success, false on error
	 */
	public function save(\Entities\Feedback $feedback) {
		$retval = false;
		if ($handle = fopen(APPPATH . 'feedback.db', 'a')) {
			$out = '{' . $feedback . '}';
			fwrite($handle, $out. "\r\n");
			fclose($handle);
			$retval = true;
		}
		return $retval;
	}
}